//
//  TimeAdjustmentViewController.h
//  Portable Traffic Signal Assistor
//
//  Created by Hao Xu on 4/23/12.
//  Copyright (c) 2012 TTU. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "Agency.h"
#import "TableSection.h"
#import "SubSystem.h"
#import "TimingPattern.h"
#import "TrafficSignalTimer.h"
#import "CustomizedBarButtonItem.h"

@interface TimeAdjustmentViewController : UITableViewController

@property (nonatomic,retain) NSMutableArray *sections;

@property (nonatomic,retain) TableSection *warningSection;
@property (nonatomic,retain) TableSection *cellPhoneTimeSection;
@property (nonatomic,retain) TableSection *controllerTimeSection;
@property (nonatomic,retain) TableSection *masterCycleTimeSection;

@property (nonatomic,retain) UIButton * addOffsetButton;
@property (nonatomic,retain) UIButton *minusOffsetButton;

@property (nonatomic,retain) Agency *agency;
@property (nonatomic,retain) SubSystem *subSystem;
@property (nonatomic,retain) TimingPattern *timingPattern;
@property (assign) int index;

@property (nonatomic,retain) NSTimer * timer;
@property (nonatomic,retain) UILabel *cellPhoneTimeLabel;
@property (nonatomic,retain) UILabel *masterTimerLabel;
@property (nonatomic,retain) UILabel *offsetTimerLabel;

- (id) initWithNibNameAndAgency:(NSString *)nibName timingPattern:(TimingPattern *)timingPattern subSystem:(SubSystem *)subSystem agency:(Agency *)agency index:(int)index bundle:(NSBundle *)nibBundle;

- (void) addBaseTimeOffset;
- (void) minusBaseTimeOffset;

@end
